:root {
    --dark-color: #330867;
    --light-color: #30cfd0;
}

* {
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    background-image: linear-gradient(to left, var(--light-color) 0%, var(--dark-color) 100%);
}

.ripple {
    position: relative;
    overflow: hidden;
    margin: 10px 0;
    padding: 20px 30px;
    font-size: 16px;
    letter-spacing: 4px;
    color: #fff;
    background-color: var(--dark-color);
    border: solid 1px var(--dark-color);
}

.ripple:focus {
    outline: none;
}

/* 关键点:点击时,出现的光环 */
.ripple .circle {
    position: absolute;
    width: 100px;
    height: 100px;
    background-color: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: scale .5s ease-out;
}

/* 关键: 关键帧:圆圈结束时,放大3倍,并消失 */
@keyframes scale {
    /* to:动画至100% */
    to {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}